<template>
  <div>
    <button @click="fn">{{ name }}</button>
  </div>
</template>

<script>
export default {
  inject: ['name', 'change'],
  mounted() {
    console.log(this.name)
  },
  methods: {
    fn() {
      console.log(1)
      this.change('ccc')
    }
  }
}
</script>

<style>

</style>
